<template>
  <div></div>
</template>

<script setup>
import MapLevelZoomClass from "../views/poi/MapLevelZoom.js";
import PoiLayerClass from "../views/poi/PoiLayer.js";

import { ref } from 'vue';
const worker = ref(null);
worker.value = new Worker(new URL('@/components/Worker.js', import.meta.url));

const initWorker = (myViewer) => {
  const mlz = new MapLevelZoomClass(myViewer, worker);
  mlz.createMouseWheelListener()
  worker.value.onmessage = (e) => {
    console.log('收到了来自 worker的消息:', e.data.result);
  };
}
defineExpose({ initWorker })
</script>